/**
 * 账户模块
 */
import { service, paramsQuery } from './request';

// 通用/直客角色
export function fetchAccountDirectRoleSelect() {
  let ret = paramsQuery('/manage/api/bus/page/get_role_list');
  return service.post(ret.path, ret.body);
}
// 通用/管理员角色
export function fetchAccountAdminRoleSelect() {
  let ret = paramsQuery('/manage/api/bus/page/get_admin_role_list');
  return service.post(ret.path, ret.body);
}
// 通用/修改密码
export function fetchAccountUpdatePwd(param) {
  let ret = paramsQuery('/manage/api/bus/user/update_pwd', param);
  return service.post(ret.path, ret.body);
}
// 通用/重置密码
export function fetchAccountRestPwd(param) {
  let ret = paramsQuery('/manage/api/bus/user/reset_pwd', param);
  return service.post(ret.path, ret.body);
}
// 通用/是否启用
export function fetchAccountStatus(param) {
  let ret = paramsQuery('/manage/api/bus/user/status', param);
  return service.post(ret.path, ret.body);
}
// 通用/删除账户
export function fetchAccountDelete(param) {
  let ret = paramsQuery('/manage/api/bus/user/delete_account', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户/账户下拉
export function fetchAccountSelect() {
  let ret = paramsQuery('/manage/api/bus/user/username_list');
  return service.post(ret.path, ret.body);
}
// 广告主账户/公司名称
export function fetchAccountCompanySelect() {
  let ret = paramsQuery('/manage/api/bus/user/company_list');
  return service.post(ret.path, ret.body);
}
// 广告主账户/列表
export function fetchAccountList(param) {
  let ret = paramsQuery('/manage/api/bus/user/get_user_list', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户/设置盈利比
export function fetchAccountSetEarnings(param) {
  let ret = paramsQuery('/manage/api/bus/user/setearnings', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户/设置曝光数比
export function fetchAccountSetExposure(param) {
  let ret = paramsQuery('/manage/api/bus/user/setexposure', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户/历史盈利比
export function fetchAccountGetEarnings(param) {
  let ret = paramsQuery('/manage/api/bus/user/getearnings', param);
  return service.get(ret.path, ret.body);
}
// 广告主账户/历史曝光数比
export function fetchAccountGetExposure(param) {
  let ret = paramsQuery('/manage/api/bus/user/getexposure', param);
  return service.get(ret.path, ret.body);
}
// 广告主账户/进入账户
export function fetchAccountEnter(param) {
  let ret = paramsQuery('/manage/api/user/get_userinfo', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户信息/新增
export function fetchAccountBaseAdd(param) {
  let ret = paramsQuery('/manage/api/bus/user/add', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户信息/详情
export function fetchAccountBase(param) {
  let ret = paramsQuery('/manage/api/bus/user/get_account_info', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户信息/更新
export function fetchAccountBaseUpdate(param) {
  let ret = paramsQuery('/manage/api/bus/user/update', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户资质/新增
export function fetchAccountAptitudeAdd(param) {
  let ret = paramsQuery('/manage/api/bus/user/upload_aptitude', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户资质/查询
export function fetchAccountAptitude(param) {
  let ret = paramsQuery('/manage/api/bus/user/get_account_aptitude', param);
  return service.post(ret.path, ret.body);
}
// 广告主账户资质/更新
export function fetchAccountAptitudeUpdate(param) {
  let ret = paramsQuery('/manage/api/bus/user/update_aptitude', param);
  return service.post(ret.path, ret.body);
}
// 管理员账户/新增
export function fetchAccountAdminAdd(param) {
  let ret = paramsQuery('/manage/api/bus/user/add_admin', param);
  return service.post(ret.path, ret.body);
}
// 管理员账户/详情
export function fetchAccountAdminDetail(param) {
  let ret = paramsQuery('/manage/api/bus/user/get_admin_account_info', param);
  return service.post(ret.path, ret.body);
}
// 管理员账户/列表
export function fetchAccountAdminList(param) {
  let ret = paramsQuery('/manage/api/bus/user/get_admin_list', param);
  return service.post(ret.path, ret.body);
}
// 管理员账户/账户下拉
export function fetchAccountAdminSelect() {
  let ret = paramsQuery('/manage/api/bus/user/get_admin_username_list');
  return service.post(ret.path, ret.body);
}
// 管理员账户/更新
export function fetchAccountAdminUpdate(param) {
  let ret = paramsQuery('/manage/api/bus/user/update_admin', param);
  return service.post(ret.path, ret.body);
}